3.2124 \(\int \frac{\left (a+b \sqrt{x}\right )^2}{x^2} \, dx\)

Optimal. Leaf size=24 \[ -\frac{a^2}{x}-\frac{4 a b}{\sqrt{x}}+b^2 \log (x) \]

[Out]

-(a^2/x) - (4*a*b)/Sqrt[x] + b^2*Log[x]

_______________________________________________________________________________________

Rubi [A]  time = 0.0411095, antiderivative size = 24, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 15, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.133 \[ -\frac{a^2}{x}-\frac{4 a b}{\sqrt{x}}+b^2 \log (x) \]

Antiderivative was successfully verified.

[In]  Int[(a + b*Sqrt[x])^2/x^2,x]

[Out]

-(a^2/x) - (4*a*b)/Sqrt[x] + b^2*Log[x]

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 6.14257, size = 26, normalized size = 1.08 \[ - \frac{a^{2}}{x} - \frac{4 a b}{\sqrt{x}} + 2 b^{2} \log{\left (\sqrt{x} \right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((a+b*x**(1/2))**2/x**2,x)

[Out]

-a**2/x - 4*a*b/sqrt(x) + 2*b**2*log(sqrt(x))

_______________________________________________________________________________________

Mathematica [A]  time = 0.0216814, size = 23, normalized size = 0.96 \[ b^2 \log (x)-\frac{a \left (a+4 b \sqrt{x}\right )}{x} \]

Antiderivative was successfully verified.

[In]  Integrate[(a + b*Sqrt[x])^2/x^2,x]

[Out]

-((a*(a + 4*b*Sqrt[x]))/x) + b^2*Log[x]

_______________________________________________________________________________________

Maple [A]  time = 0.003, size = 23, normalized size = 1. \[ -{\frac{{a}^{2}}{x}}+{b}^{2}\ln \left ( x \right ) -4\,{\frac{ab}{\sqrt{x}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((a+b*x^(1/2))^2/x^2,x)

[Out]

-a^2/x+b^2*ln(x)-4*a*b/x^(1/2)

_______________________________________________________________________________________

Maxima [A]  time = 1.44026, size = 31, normalized size = 1.29 \[ b^{2} \log \left (x\right ) - \frac{4 \, a b \sqrt{x} + a^{2}}{x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*sqrt(x) + a)^2/x^2,x, algorithm="maxima")

[Out]

b^2*log(x) - (4*a*b*sqrt(x) + a^2)/x

_______________________________________________________________________________________

Fricas [A]  time = 0.234225, size = 36, normalized size = 1.5 \[ \frac{2 \, b^{2} x \log \left (\sqrt{x}\right ) - 4 \, a b \sqrt{x} - a^{2}}{x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*sqrt(x) + a)^2/x^2,x, algorithm="fricas")

[Out]

(2*b^2*x*log(sqrt(x)) - 4*a*b*sqrt(x) - a^2)/x

_______________________________________________________________________________________

Sympy [A]  time = 1.60933, size = 20, normalized size = 0.83 \[ - \frac{a^{2}}{x} - \frac{4 a b}{\sqrt{x}} + b^{2} \log{\left (x \right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((a+b*x**(1/2))**2/x**2,x)

[Out]

-a**2/x - 4*a*b/sqrt(x) + b**2*log(x)

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.216487, size = 32, normalized size = 1.33 \[ b^{2}{\rm ln}\left ({\left | x \right |}\right ) - \frac{4 \, a b \sqrt{x} + a^{2}}{x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*sqrt(x) + a)^2/x^2,x, algorithm="giac")

[Out]

b^2*ln(abs(x)) - (4*a*b*sqrt(x) + a^2)/x